home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug233 / savag.c < prev    next >
Text File  |  1987-06-30  |  384b  |  19 lines

  1. /*  VERSION 0001  (DATE: 17/05/87)  (TIME: 14:35)  */
  2. /* Savage floating point */
  3. #include <stdio.h>
  4. #include <math.h>
  5. #define        MAX_LOOP 2500
  6.  
  7. double    a;
  8. int        gob,i;
  9.  
  10. main()
  11. {
  12.     a=1.0;
  13.     printf("Type <CR> to begin %d iterations.",MAX_LOOP);
  14.     gob=getchar();
  15.     for(i=0;i<MAX_LOOP;i++)
  16.         a= tan(atan(exp(log(sqrt(a*a))))) + 1.0;
  17.     printf("\na=%20.15f\n",a);
  18. }
  19.